import { Injectable } from '@angular/core'
import { HttpClientService } from '../httpClient/http'

@Injectable({
  providedIn: 'root'
})
export class ZoneService {
  queryData = {
    pager: { Start: 0, Limit: 0 },
    filter: { Lambda: 'item=>item.Enable', Navigations: ['CityInfo.ProvinceInfo'] },
    sorters: [{ Property: 'item=>item.UpdateTime', Direction: 'Descending' }]
  }

  constructor(private http: HttpClientService) {}

  // 查询区域列表
  query(callback, errorBack?) {
    this.http.post(this.queryData, '/Platform/Json/ZoneService.svc/Query', callback, errorBack)
  }
  // 查询区域详情
  fetch(reqdata, callback, errorBack?) {
    this.http.post(reqdata, '/House1/Json/ZoneService.svc/Fetch', callback, errorBack)
  }
}
